package util;

import javax.servlet.RequestDispatcher;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSessionEvent;
import javax.servlet.http.HttpSessionListener;

public class LoginListener implements   HttpSessionListener{
	public   void   sessionCreated(HttpSessionEvent se)   { 
	      se.getSession().setMaxInactiveInterval(36);
	} 

	public   void   sessionDestroyed(HttpSessionEvent se)   { 
	    
//		RequestDispatcher rd=request.getRequestDispatcher("/login.jsp");
//		request.setAttribute("message", "illegal to access");
//		rd.forward(request, response);//服务器自动登出
	}
}